package com.biz.primus.model.order.vo.request;

import com.biz.primus.model.depot.vo.DepotRespVo;
import com.biz.primus.model.order.enums.InvoiceType;
import com.biz.primus.model.order.enums.OrderClient;
import com.biz.primus.model.order.enums.OrderPaymentWay;
import com.biz.primus.model.order.enums.OrderType;
import com.biz.primus.model.order.vo.OrderConsigneeInfoVO;
import com.biz.primus.model.order.vo.OrderPromotionVO;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;

/**
 * 订单汇总请求接受视图，只接受必要字段
 *
 * @author Tiger Feng
 * @date 2017年10月31日
 */
@Data
@NoArgsConstructor
@ApiModel("订单汇总请求模型")
public class OrderSummaryRequestVO implements Serializable {
    private static final long serialVersionUID = -4591925665555250276L;

    @ApiModelProperty("订单汇总编号")
    private String orderSummaryCode;
    @ApiModelProperty("订单类型(FLASH:闪送、STORE:商城、SECKI:秒杀、SYNCH:同步)")
    private OrderType orderType;
    @ApiModelProperty("门店编码(门店或省仓店)")
    private String depotCode;
    @ApiModelProperty("用户ID")
    private Long userId;
    //    @ApiModelProperty("用户位置纬度")
//    private BigDecimal consigneeLat;
//    @ApiModelProperty("用户位置经度")
//    private BigDecimal consigneeLon;
    @ApiModelProperty(value = "收货信息")
    private OrderConsigneeInfoVO consignee;

    @ApiModelProperty("门店订单")
    private OrderRequestVO storeOrder;
    @ApiModelProperty("总店订单、旗舰店订单")
    private OrderRequestVO flagshipOrder;
    @ApiModelProperty("促销")
    private OrderPromotionVO promotion;
    @ApiModelProperty(value = "参加促销标示,不传或false标示不参加促销", required = true)
    private Boolean usePromotion;
    @ApiModelProperty(value = "可以使用优惠券标示，如果促销和优惠券无法同时使用时，选择了促销，本字段返回false")
    private Boolean canUseDiscountCoupon;
    @ApiModelProperty(value = "支付方式",
            notes = "\"alipay\":\"支付宝支付\",\"balance\":\"电子钱包支付\",\"wechatpay\":\"微信支付\",\"cod\":\"货到付款\",\"unionpay\":\"银联支付\"")
    private OrderPaymentWay paymentWay;
    @ApiModelProperty("用户备注")
    private String userRemark;
    @ApiModelProperty(value = "发票类型",notes = "\"personal\":\"个人\",\"company\":\"公司\",\"none\":\"不开发票\"")
    private InvoiceType invoiceType;
    @ApiModelProperty("发票类型为公司时有值空")
    private String invoiceTitle;
    @ApiModelProperty(value = "订单来源",notes = "\"android\":\"安卓\",\"wechat\":\"微商城\",\"ios\":\"ios\"")
    private OrderClient client;

    //--不需要传入字段-------------------
    @ApiModelProperty(value = "订单IP", hidden = true)
    @JsonIgnore
    private String orderIp;
    @ApiModelProperty(value = "当前订单汇总可支持的支付方式列表", hidden = true)
    @JsonIgnore
    private List<OrderPaymentWay> supportPaymentWays;
    @ApiModelProperty(value = "未支付订单过期时间", hidden = true)
    @JsonIgnore
    private Timestamp expireAt;
    @ApiModelProperty(value = "商户自备注(一般用于客服)", hidden = true)
    @JsonIgnore
    private String selfRemark;
    @ApiModelProperty(value = "门店", hidden = true)
    @JsonIgnore
    private DepotRespVo depot;
}
